<style>
    .form-group .col-sm-2{
        min-width: 140px;
    }
</style>
<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    <div class="row">

        <div class="col-md-6 col-xs-12 form-group business_id_div ">
            <label for="c-contract_id" class="control-label col-xs-12 col-sm-2">{:__('选择合同')}:</label>
            <div class="col-xs-12 col-sm-8">

                <div class="clickbox">

                    <label class="control-label">
                        <a href="javascript:;" data-url="{$addtype=='add'?'facrm/contract/receivables/selectcontract':'facrm/contract/index/lists/select/1'}" id="select-resources" >
                            {:isset($contract_r['name'])?$contract_r['name']:__('选择合同')}</a>
                    </label>
                    <input type="hidden" id="c-contract_id" name="row[contract_id]" id="c-eventkey" class="form-control" value="{:isset($contract_r['id'])?$contract_r['id']:''}" data-rule="required" readonly/>
                </div>

            </div>
        </div>

        <div class="col-md-6 col-xs-12 form-group">
            <label for="c-invoice_body" class="control-label col-xs-12 col-sm-2">{:__('开票主体')}:</label>
            <div class="col-xs-12 col-sm-8">
                <input id="c-invoice_body" data-rule="required" type="text" class="form-control" name="row[invoice_body]" value="{$invoice_set.invoice_body}"/>
            </div>
        </div>

        <div class="col-md-6 col-xs-12 form-group">
            <label for="c-invoice_name" class="control-label col-xs-12 col-sm-2">{:__('发票抬头')}:</label>
            <div class="col-xs-12 col-sm-8">
                <input id="c-invoice_name" data-rule="required" type="text" class="form-control" name="row[invoice_name]" value=""/>
            </div>
        </div>

        <div class="col-md-6 col-xs-12 form-group">
            <label for="c-invoice_issue" class="control-label col-xs-12 col-sm-2">{:__('抬头类型')}:</label>
            <div class="col-xs-12 col-sm-8">
                {:build_radios('row[invoice_issue]', ['1'=>__('企业'), '2'=>__('个人'), '3'=>__('事业单位')])}
            </div>
        </div>
        <div class="invoice_issue">
        <div class="col-md-6 col-xs-12 form-group">
            <label for="c-invoice_type" class="control-label col-xs-12 col-sm-2">{:__('发票类型')}:</label>
            <div class="col-xs-12 col-sm-8">
                {:build_radios('row[invoice_type]', ['1'=>__('增值税普票'), '2'=>__('增值税专票')])}
            </div>
        </div>
        <div class="col-md-6 col-xs-12 form-group">
            <label for="c-register_no" class="control-label col-xs-12 col-sm-2">{:__('统一社会信用代码')}:</label>
            <div class="col-xs-12 col-sm-8">
                <input id="c-register_no"  type="text" class="form-control" name="row[register_no]" value=""/>
            </div>
        </div>

        <div class="col-md-6 col-xs-12 form-group">
            <label for="c-bank_name" class="control-label col-xs-12 col-sm-2">{:__('开户行名称')}:</label>
            <div class="col-xs-12 col-sm-8">
                <input id="c-bank_name"  type="text" class="form-control" name="row[bank_name]" value=""/>
            </div>
        </div>
        <div class="col-md-6 col-xs-12 form-group">
            <label for="c-bank_name" class="control-label col-xs-12 col-sm-2">{:__('开户账号')}:</label>
            <div class="col-xs-12 col-sm-8">
                <input id="c-bank_no"  type="text" class="form-control" name="row[bank_no]" value=""/>
            </div>
        </div>

        </div>

        <div class="col-md-6 col-xs-12 form-group">
            <label for="c-money" class="control-label col-xs-12 col-sm-2">{:__('开票金额')}:</label>
            <div class="col-xs-12 col-sm-8">
                <input id="c-money"  type="number" data-rule="required" class="form-control" name="row[money]" value=""/>
                <span class="help-block hepl-money"></span>
            </div>
        </div>
        <div class="col-md-6 col-xs-12 form-group">
            <label for="c-tax_rate" class="control-label col-xs-12 col-sm-2">{:__('开票税率')}:</label>
            <div class="col-xs-12 col-sm-8">
                <input id="c-tax_rate"  type="number" data-rule="required" class="form-control" name="row[tax_rate]" value="{$invoice_set.tax_rate1}"/>
                <span class="help-block">不用输入%号</span>
            </div>
        </div>

        <div class="col-md-6 col-xs-12 form-group">
            <label for="c-content" class="control-label col-xs-12 col-sm-2">{:__('开票内容')}:</label>
            <div class="col-xs-12 col-sm-8">
                <input id="c-content"  type="text" class="form-control" name="row[content]" value=""/>
            </div>
        </div>

        <div class="col-md-6 col-xs-12 form-group">
            <label for="c-email" class="control-label col-xs-12 col-sm-2">{:__('接收邮箱')}:</label>
            <div class="col-xs-12 col-sm-8">
                <input id="c-email"  type="text" class="form-control" name="row[email]" value=""/>
                <span class="help-block">可空，输入客户邮箱完成开票时，会把附件自动发送给客户。</span>
            </div>
        </div>

        <div class="col-md-6 col-xs-12 form-group">
            <label for="c-user_name" class="control-label col-xs-12 col-sm-2">{:__('收件人')}:</label>
            <div class="col-xs-12 col-sm-8">
                <input id="c-user_name"  type="text" class="form-control" name="row[user_name]" value=""/>
                <span class="help-block">如需要邮寄请填写</span>
            </div>
        </div>
        <div class="col-md-6 col-xs-12 form-group">
            <label for="c-user_phone" class="control-label col-xs-12 col-sm-2">{:__('手机')}:</label>
            <div class="col-xs-12 col-sm-8">
                <input id="c-user_phone"  type="text" class="form-control" name="row[user_phone]" value=""/>
                <span class="help-block">如需要邮寄请填写</span>
            </div>
        </div>
        <div class="col-md-6 col-xs-12 form-group">
            <label for="c-user_address" class="control-label col-xs-12 col-sm-2">{:__('邮寄地址')}:</label>
            <div class="col-xs-12 col-sm-8">
                <input id="c-user_address"  type="text" class="form-control" name="row[user_address]" value=""/>
                <span class="help-block">如需要邮寄请填写</span>
            </div>
        </div>


        <div class="col-md-6 col-xs-12 form-group">
            <label for="c-remarks" class="control-label col-xs-12 col-sm-2">{:__('备注')}:</label>
            <div class="col-xs-12 col-sm-8">
                <textarea id="c-remarks" class="form-control" name="row[remarks]"></textarea>
            </div>
        </div>






        <div class="col-md-6 col-xs-12 form-group">
            <label for="c-flow_admin_id" class="control-label col-xs-12 col-sm-2">{:__('审批人')}:</label>
            <div class="col-xs-12 col-sm-8">
                <input id="c-flow_admin_id"   data-source="facrm/common/selectpage/model/admin/type/all" data-field="nickname" data-multiple="true"  {$flow->config==1?'disabled ':'data-rule="required"'}
                       class="form-control selectpage" name="row[flow_admin_id]" type="text" value="{if $flow->config==1}{$flow->getAdminIds($flow,$auth->id)}{/if}">

            </div>
        </div>


    </div>


    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>







